home *** CD-ROM | disk | FTP | other *** search
- Path: easy.in-chemnitz.de!mkmk!floh
- From: floh@mkmk.in-chemnitz.de (Andre Weissflog)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: TMapping again!
- Message-ID: <mq2Xx*aB0@mkmk.in-chemnitz.de>
- Date: Sun, 14 Jan 1996 02:08:22 CET
- Reply-To: floh@mkmk.in-chemnitz.de
- References: <4d0ou6$835@astfgl.idb.hist.no> <Z31Wx*zA0@mkmk.in-chemnitz.de>
- <38231990@kone.fipnet.fi> <SRGWx*+A0@mkmk.in-chemnitz.de> <38232018@kone.fipnet.fi>
- Distribution: world
- Organization: private uucp site
- X-Newsreader: Arn V 1.04
-
- In article <38232018@kone.fipnet.fi>, "Jyrki Saarinen" writes:
-
- > > Yes, good old subdivision, currently at 16 pixels resolution,
- > > always horizontal. I've had a 32 pixel version and
- > > vertical/horizontal span drawers for some time, but trashed
- > > it for the sake of simplicity. I'm quite happy with it now,
- > > but "the last word has not been spoken yet" :-)
- >
- > Yep. Do you use the triangle feature that horizontal linear
- > steps are constant, so they have to calculated just once?
- > (u/z, v/z and 1/z)
- >
- No. After clipping (in viewer space) a triangle may consist
- of up to 6 vertices, so I would have to triangulate it
- first anyway. My current renderer works directly on
- 'trapezoids'. I'll have to chew the idea to optimize
- the whole low level rendering to triangles
- a while first, and then decide, whether it's worth
- it or not.
-
- > Do you use fixed-point? When doing 1/z quite many bits
- > must be used for fraction. Also, using divs.w for
- > the two divides between every 16 pixel would give
- > a little speedup compared to divs.l
- >
- Yes, fixed point, almost each value has another number of fraction
- bits. I'm using numbers with 28, 24, 20, 16 and 8 fraction bits, so
- that they provide the most accuracy with the greates number range just
- as they are needed (it took me a week to find a good solution). The
- current mapper chokes on z-values less then 16, but this can be solved
- by placing the front clipping plane at 17 :-)
-
- Instead of 2 divs, one can also use 1 div and 2 muls:
-
- z' = 1 / one_div_z
- u = u_div_z * z'
- v = v_div_z * z'
-
- I don't have the m68k cycles in my head at the moment, but
- this would make sense on a 486dx4/100 for instance, with
- a 1 cycle integer multiplier. But this may be a bit
- esoteric. (I must admit that I didn't do work on
- the m68k versions for quite a while, shame on me).
-
- Bye,
- -Floh
-
- ====//=== Andre Weissflog <floh@mkmk.in-chemnitz.de> =======
- ...// Sep'95: Return Of The Living Death...................
- \\// 90% of everything is crap (Sturgeon's Law)...........
- =\\===============================================Amiga!=
-
-